package com.repository;

import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.io.Serializable;

/**
 * Created by sola on 2017/9/22.
 */
@NoRepositoryBean
public interface ReadOnlyPagingAndSortingRepository<T, ID extends Serializable> extends PagingAndSortingRepository<T, ID> {

    @Override
    @SuppressWarnings("unchecked")
    //@RestResource(exported = false)
    <S extends T> S save(S entity);

    @Override
    //@RestResource(exported = false)
    void delete(ID aLong);

    @Override
    //@RestResource(exported = false)
    void delete(T entity);
}
